#ifndef BEGONIA_H

#define BEGONIA_H

#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include <cstdio>
#include <new>
#include <ctime>
#include <GL/glut.h>
//#include <GL/GLAUX.H>
#include <AL/alut.h>
#include <AL/al.h>
#include <AL/alc.h>

//inline double abs(double a) {return a>0?a:-a;}
inline double sqr(double a) {return a*a;}

void drawcircle(double x,double y,double r);
void drawcircle2(double x,double y,double r);
void drawstring(double x,double y,const char* str,double offset=0.0);
void drawJiki();
void drawFPS();
void drawPictures(); 
void drawPercentage();

void aiDecision();
void init();

extern "C" int slices;
extern "C" int stacks;
extern "C" int level,stage;
extern "C" const int scw,sch;
extern "C" int scx,scy;
extern "C" const double mvl, mvr, mvb, mvt;
extern "C" const double corermax,coredr;
extern "C" double corex,corey;
extern "C" double corer;
extern "C" const double cbwmax,cbhmax,cbdw,cbdh,cbwmin;
extern "C" double cbx,cby,cbw,cbh;
extern "C" const double fbw,fbh,fbk,fcw,fch;
extern "C" double fbx,fby;
extern "C" const double spd1,spd2,spd3,cbspd;
extern "C" const double smul;
extern "C" const double pr;
extern "C" double tfact;
extern "C" const int picedge;
extern "C" bool missed;
extern "C" bool shooting;
extern "C" bool zdown,xdown;
extern "C" const double dLarge;
extern "C" double fps;
extern "C" double per;
extern "C" const double dper1,dper2;
extern "C" double t,tlast;
extern "C" double realts[60];
extern "C" double realfps;
extern "C" int tp;
extern "C" int picn,pictot;
extern "C" bool ai;
extern "C" int menup;
extern "C" char tests[100];
extern "C" bool aikeydown[7];
extern "C" ALuint MissBuffer, Source;

#endif
